package com.gulimall.product.feign.fallback;

import com.gulimall.common.exception.BizCodeEnum;
import com.gulimall.common.utils.R;
import com.gulimall.product.feign.SeckillFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author djg
 * @date 2020/9/22
 * @des
 */
@Slf4j
@Component
public class SeckillFeignClientFallback implements SeckillFeignClient {
    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.error("SeckillFeignClient异常回调。。。");
        return R.error(BizCodeEnum.TO_MANY_REQUEST.getCode(), BizCodeEnum.TO_MANY_REQUEST.getMessage());
    }
}
